Salesforce UX API icon

Salesforce UX API

(0 reviews)

TMF654- listBucket towards Matrixx V2 - PR

This use case is intended to provide group discount and subscriber Estimate Recurring Charge from Matrixx System.

URL
https://[localhost]:[port]/sfdc-ux/v2/{businessId}/PR/{businessId}/bucket
url Param
nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit.Y
nametypedescriptionrequired
client_idstringThe client_id identifying the channel.Y
client_secretstringPassword associated with the client_id.Y
X-Correlation-IDstringIdentifier that correlates HTTP request between a client and server.
Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction.
Y
Query Param
nametypedescriptionrequired
logicalResource.idnumberMSISDN numberY*
partyAccount.idnumbersubscription IdY*

Note - Either 'logicalResource.id' or 'partyAccount.id' mandatory.

cURL request

curl --location 'https://nonprod.esb.cloud.lla.com/dev/sfdc-ux/v2/PR/bucket?partyAccount.id=3172024-3172024' \
--header 'X-Correlation-Id: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92c2b' \
--header 'client_id: 784c9a6dd7ae49768816cab57fcf1fa1' \
--header 'client_secret: 187b259EB77441babbF611d2646C670d'

Response

[
    {
        "id": "1",
        "name": "Prepaid Balance",
        "@type": "MainBalance",
        "@baseType": "Bucket",
        "description": "United States dollar",
        "usageType": "monetary",
        "isShared": false,
        "remainingValue": {
            "amount": 0.0,
            "units": "USD"
        },
        "validFor": {
            "startDateTime": "2024-02-21T08:41:02.000000-07:00",
            "endDateTime": "65535-12-31T23:59:59.999999Z"
        },
        "relatedParty": [
            {
                "id": "S-103",
                "@type": "SubscriptionRef"
            }
        ],
        "product": [
            {
                "id": "94",
                "name": "Prepaid_Template_Shared",
                "@type": "CatalogRef"
            }
        ],
        "taxItem": [
            {
                "taxAmount": {
                    "unit": "USD",
                    "value": 3.15
                },
                "taxCategory": "STATE SALES TAX",
                "@type": "TaxItem"
            },
            {
                "taxAmount": {
                    "unit": "USD",
                    "value": 0.3
                },
                "taxCategory": "CITY SALES TAX",
                "@type": "TaxItem"
            },
            {
                "taxAmount": {
                    "unit": "USD",
                    "value": 0.5
                },
                "taxCategory": "PR 911 SERVICE CHARGE",
                "@type": "TaxItem"
            },
            {
                "taxAmount": {
                    "unit": "USD",
                    "value": 0.0
                },
                "taxCategory": "FEDERAL COST RECOVERY FEE",
                "@type": "TaxItem"
            },
            {
                "taxAmount": {
                    "unit": "USD",
                    "value": 0.0
                },
                "taxCategory": "PUERTO RICO REGULATORY FEE",
                "@type": "TaxItem"
            },
            {
                "taxAmount": {
                    "unit": "USD",
                    "value": 0.27
                },
                "taxCategory": "PR UNIVERSAL SERVICE FUND",
                "@type": "TaxItem"
            },
            {
                "taxAmount": {
                    "unit": "USD",
                    "value": 0.45
                },
                "taxCategory": "FEDERAL UNIVERSAL SERVICE FUND",
                "@type": "TaxItem"
            },
            {
                "taxAmount": {
                    "unit": "USD",
                    "value": 0.0
                },
                "taxCategory": "FEDERAL COST RECOVERY CHARGE",
                "@type": "TaxItem"
            }
        ],
        "impactedAmount": {
            "amount": 33.5,
            "units": "USD"
        }
    },
    {
        "id": "7",
        "name": "Included MMS - Prepaid",
        "@type": "MMS",
        "@baseType": "Bucket",
        "description": "Picture",
        "usageType": "other",
        "isShared": false,
        "remainingValue": {
            "amount": 0.0,
            "units": "MMS"
        },
        "validFor": {
            "startDateTime": "2024-03-22T00:00:00.000000-06:00",
            "endDateTime": "2024-04-21T00:00:00.000000-06:00"
        },
        "relatedParty": [
            {
                "id": "S-103",
                "@type": "SubscriptionRef"
            }
        ],
        "product": [
            {
                "id": "72",
                "name": "Prepaid_Template_Shared",
                "@type": "CatalogRef"
            }
        ]
    },
    {
        "id": "7",
        "name": "Included Minutes - Prepaid",
        "@baseType": "Bucket",
        "@type": "Voice",
        "description": "Voice",
        "usageType": "voice",
        "isShared": false,
        "remainingValue": {
            "amount": 0.0,
            "units": "minutes"
        },
        "validFor": {
            "startDateTime": "2024-03-22T00:00:00.000000-06:00",
            "endDateTime": "2024-04-21T00:00:00.000000-06:00"
        },
        "relatedParty": [
            {
                "id": "S-103",
                "@type": "SubscriptionRef"
            }
        ],
        "product": [
            {
                "id": "94",
                "name": "Prepaid_Template_Shared",
                "@type": "CatalogRef"
            }
        ]
    },
    {
        "id": "9",
        "name": "Included SMS - Prepaid",
        "@type": "SMS",
        "@baseType": "Bucket",
        "description": "Text",
        "usageType": "sms",
        "isShared": false,
        "remainingValue": {
            "amount": 0.0,
            "units": "SMS"
        },
        "validFor": {
            "startDateTime": "2024-03-22T00:00:00.000000-06:00",
            "endDateTime": "2024-04-21T00:00:00.000000-06:00"
        },
        "relatedParty": [
            {
                "id": "S-103",
                "@type": "SubscriptionRef"
            }
        ],
        "product": [
            {
                "id": "94",
                "name": "Prepaid_Template_Shared",
                "@type": "CatalogRef"
            }
        ]
    },
    {
        "id": "6",
        "name": "Flag - Unlimited Hotspot usage",
        "@type": "Flag - Unlimited Hotspot usage",
        "@baseType": "Bucket",
        "description": "Flag",
        "usageType": "other",
        "isShared": false,
        "remainingValue": {
            "amount": 0.0,
            "units": "none"
        },
        "validFor": {
            "startDateTime": "2024-02-21T08:41:56.000000-07:00",
            "endDateTime": "65535-12-31T23:59:59.999999Z"
        },
        "relatedParty": [
            {
                "id": "S-103",
                "@type": "SubscriptionRef"
            }
        ],
        "product": [
            {
                "id": "94",
                "name": "Prepaid_Template_Shared",
                "@type": "CatalogRef"
            }
        ]
    },
    {
        "id": "5",
        "name": "Flag - Unlimited Internet usage",
        "@type": "Flag - Unlimited Internet usage",
        "@baseType": "Bucket",
        "description": "Flag",
        "usageType": "other",
        "isShared": false,
        "remainingValue": {
            "amount": 0.0,
            "units": "none"
        },
        "validFor": {
            "startDateTime": "2024-02-21T08:41:56.000000-07:00",
            "endDateTime": "65535-12-31T23:59:59.999999Z"
        },
        "relatedParty": [
            {
                "id": "S-103",
                "@type": "SubscriptionRef"
            }
        ],
        "product": [
            {
                "id": "94",
                "name": "Prepaid_Template_Shared",
                "@type": "CatalogRef"
            }
        ]
    },
    {
        "id": "11",
        "name": "HotSpot Data - Prepaid",
        "@type": "Data",
        "@baseType": "Bucket",
        "description": "Data",
        "usageType": "data",
        "isShared": false,
        "remainingValue": {
            "amount": 0.0,
            "units": "mbytes"
        },
        "validFor": {
            "startDateTime": "2024-03-22T00:00:00.000000-06:00",
            "endDateTime": "2024-04-21T00:00:00.000000-06:00"
        },
        "relatedParty": [
            {
                "id": "S-103",
                "@type": "SubscriptionRef"
            }
        ],
        "product": [
            {
                "id": "94",
                "name": "Prepaid_Template_Shared",
                "@type": "CatalogRef"
            }
        ]
    },
    {
        "id": "12",
        "name": "Included Data - Prepaid",
        "@type": "Data",
        "@baseType": "Bucket",
        "description": "Data",
        "usageType": "data",
        "isShared": false,
        "remainingValue": {
            "amount": 0.0,
            "units": "mbytes"
        },
        "validFor": {
            "startDateTime": "2024-03-22T00:00:00.000000-06:00",
            "endDateTime": "2024-04-21T00:00:00.000000-06:00"
        },
        "relatedParty": [
            {
                "id": "S-103",
                "@type": "SubscriptionRef"
            }
        ],
        "product": [
            {
                "id": "94",
                "name": "Prepaid_Template_Shared",
                "@type": "CatalogRef"
            }
        ]
    },
    {
        "id": "3",
        "name": "Prepaid Group Discount",
        "@type": "Discount",
        "usageType": "monetary",
        "impactedAmount": {
            "amount": -5,
            "units": "USD"
        }
    }
]
Definitions

Each of the request parameters is detailed.

nametypedescriptionrequired
idstringResource ID of balance instance.N
namestringName of balance template as defined in My MATRIXX.N
@typestringBucket type, like 'MainBalance, MMS, Voice, Data, etc..'N
@baseTypebase typeN
descriptionClass name of balance as defined in pricing file.
Eg: United States dollar, Voice, Text, Data, etc..
N
usageTypestringTMF enum values based on Balance Class Name
Eg: monetary, voice, sms, data, other
N
isSharedbooleanType of balance wallet owner. values: 1=Subscriber, 2=Group"N
remainingValueobjectA quantity (Quantity). Indicate the amount on the bucket.N
remainingValue.amountnumberCurrent balance amount. May not be accurate.N
remainingValue.unitsstringUnitN
validForObjectA time period. productTerm validity periodN
validFor.endDateTimedatetimeEnd time of the balance. For a periodic or on-demand balance, it is the end time of the period. For a simple balance, it is the end validity time of the balance.",N
validFor.startDateTimedatetimeStart time of the balance. For a periodic or on-demand balance, it is the start time of the period. For a simple balance, it is the start validity time of the balance.",N
relatedPartyarrayA list of related partiesN
relatedParty.idstringExternal ID of balance owner.N
relatedParty.@typestringReference of SubscriptionN
logicalResourcearraylogical resourceN
logicalResource.namestringPublic identifier value of a productN
logicalResource.valuestringPublic identifier type valueN
logicalResource.@typestringReference of Public identifier, like MSISDN.N
productarrayA list of product referencesN
product.idstringPricing object ID of catalog item, if applicableN
product.namestringExternal ID of catalog item, if applicable.N
product.@typestringReference of catalogN
taxItemarrayLook below taxItem values for more detailsN
taxItem.taxCategorystringtax CategoryN
taxItem.@typestringtax typeN
taxItem.taxAmountobjectA money (Money). Tax applied.N
taxItem.taxAmount.valuefloatAmount of balance updateN
taxItem.taxAmount.unitstringunitN
impactedAmountobjectImpacted AmountN
impactedAmount.amountfloatthis is an Impact amount for Next Recharge if the customer will be on existing plan.N
impactedAmount.unitsstringCurrency (ISO4217 norm uses 3 letters to define the currency)N
taxItem Values
NameDescriptionSample
CITY SALES TAXTax name (set for tax related UpdateType only){
"taxAmount": {
"unit": "USD",
"value": 0.3
},
"taxCategory": "CITY SALES TAX",
"@type": "TaxItem"
},
STATE SALES TAXTax name (set for tax related UpdateType only){
"taxAmount": {
"unit": "USD",
"value": 0.0
},
"taxCategory": "FEDERAL COST RECOVERY FEE",
"@type": "TaxItem"
},
PR 911 SERVICE CHARGETax name (set for tax related UpdateType only){
"taxAmount": {
"unit": "USD",
"value": 0.5
},
"taxCategory": "PR 911 SERVICE CHARGE",
"@type": "TaxItem"
},
FEDERAL COST RECOVERY FEETax name (set for tax related UpdateType only){
"taxAmount": {
"unit": "USD",
"value": 0.0
},
"taxCategory": "FEDERAL COST RECOVERY FEE",
"@type": "TaxItem"
},
PUERTO RICO REGULATORY FEETax name (set for tax related UpdateType only){
"taxAmount": {
"unit": "USD",
"value": 0.0
},
"taxCategory": "PUERTO RICO REGULATORY FEE",
"@type": "TaxItem"
},
PR UNIVERSAL SERVICE FUNDTax name (set for tax related UpdateType only){
"taxAmount": {
"unit": "USD",
"value": 0.27
},
"taxCategory": "PR UNIVERSAL SERVICE FUND",
"@type": "TaxItem"
},
FEDERAL COST RECOVERY CHARGETax name (set for tax related UpdateType only){
"taxAmount": {
"unit": "USD",
"value": 0.0
},
"taxCategory": "FEDERAL COST RECOVERY CHARGE",
"@type": "TaxItem"
}
FEDERAL UNIVERSAL SERVICE FUNDTax name (set for tax related UpdateType only){
"taxAmount": {
"unit": "USD",
"value": 0.45
},
"taxCategory": "FEDERAL UNIVERSAL SERVICE FUND",
"@type": "TaxItem"
},

Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400 ,
      "message" : "The request is invalid or not properly formed.",
      "description" : "Bad request"
    }
  ]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [{
      "code" : 401 ,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
    }
  ]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{

      "code" : 404,
       "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }
  ]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method post not allowed for : /{businessId}/billingAccount/{id}"
        }]
}
[ 429 ]

Too Many Requests - client has sent too many requests in a space of time (rate limiting). When a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources. Therefore, servers may drop connections or take other steps instead of responding with the 429 status code, when limiting resource usage.

{
  "errors" : [{

      "code" : 429,
       "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }
  ]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "The request failed due to an internal error.",
      "description": ""
    }
  ]
}
[ 501]
{
   "errors":[
      {
         "code":501,
         "message":"Not implemented",
         "description":"Operation GET /billingAccount/{id} for Business Id: XXXX not implemented"
      }
   ]
}
[ 503 ]

Service Unavailable - temporary maintenance of service, try again later. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay will be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. Note: The existence of the 503 status code does not imply that a server will use it when becoming overloaded. Servers may simply refuse the connection.


Reviews